package cn.iocoder.yudao.module.crossborder.order.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 跨境电商客户状态枚举
 *
 * @author LHL
 */
@AllArgsConstructor
@Getter
public enum CustomerStatusEnum {

    NORMAL(0, "正常"),
    FROZEN(1, "冻结"),
    BLACKLIST(2, "黑名单"),
    ;

    /**
     * 状态值
     */
    private final Integer status;
    
    /**
     * 状态名称
     */
    private final String name;

    public static CustomerStatusEnum getByStatus(Integer status) {
        for (CustomerStatusEnum value : values()) {
            if (value.getStatus().equals(status)) {
                return value;
            }
        }
        return null;
    }

}
